<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=3.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>flex布局</title>
    <style>
        body {
            background-color: #eeeeee;
        }

        h1 {
            width: 400px;
            text-align: center;
            box-sizing: border-box;
            border: 1px red dashed;
            margin: 10px auto;
            padding: 5px 5px;
            background-color: white;
        }
        p {
            width: 400px;
            text-align: left;
            font-size: 20px;
            box-sizing: border-box;
            border: 1px red dashed;
            margin: 10px auto;
            padding: 5px 5px;
            background-color: white;
        }
        .main {
            margin: 0 auto;
            background-color: white;
            display: flex;
            width: 400px;
            height: 170px;
            flex-direction: column;
            justify-content: flex-start;
            margin-bottom: 10px;
        }

        .flex-end {
            justify-content: flex-end;
        }

        .center {
            justify-content: center;
        }

        .space-around {
            justify-content: space-around;
        }

        .space-evenly {
            justify-content: space-evenly;
        }

        .space-between {
            justify-content: space-between;
        }

        div div {
            text-align: center;
            font-size: 40;
            font-weight: bold;
            color: white;
            padding: 10px;
            /* width: 100px; */
        }

        div div:nth-child(1) {
            background-color: red;
        }

        div div:nth-child(2) {
            background-color: #BD10E0;
        }

        div div:nth-child(3) {
            background-color: blue;
        }
    </style>
</head>

<body>
    <h1>justify-content</h1>
    <p>1. justify-content: flex-start</p>
    <div class="main">
        <div>前端小课</div>
        <div>FlexBox布局</div>
        <div>公众号：素燕</div>
    </div>
    <p>2. justify-content: flex-end</p>
    <div class="main flex-end">
        <div>前端小课</div>
        <div>FlexBox布局</div>
        <div>公众号：素燕</div>
    </div>
    <p>3. justify-content: center</p>
    <div class="main center">
        <div>前端小课</div>
        <div>FlexBox布局</div>
        <div>公众号：素燕</div>
    </div>
    <p>4. justify-content: space-around</p>
    <div class="main space-around">
        <div>前端小课</div>
        <div>FlexBox布局</div>
        <div>公众号：素燕</div>
    </div>
    <p>5. justify-content: space-evenly</p>
    <div class="main space-evenly">
        <div>前端小课</div>
        <div>FlexBox布局</div>
        <div>公众号：素燕</div>
    </div>
    <p>6. justify-content: space-between</p>
    <div class="main space-between">
        <div>前端小课</div>
        <div>FlexBox布局</div>
        <div>公众号：素燕</div>
    </div>
</body>

</html>